package com.zyncro.user;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ZyncroUserFactory {
	
	private ApplicationContext context;
	
	public ZyncroUserFactory(String usersLocation){
		
		String[] contextLocations = new String[] { usersLocation }; 
		context = new ClassPathXmlApplicationContext(contextLocations);
	}
	
	public ZyncroUser getUser(String userId){
		return (ZyncroUser) context.getBean(userId);
	}
}
